package com.wisemoresystem.seal.action.useapply.select;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.wisemoresystem.seal.base.action.ProjBaseAction;
import com.wisemoresystem.seal.service.UseSelectService;

/**
 * 关于用印的查询
 * 
 * @author Administrator
 *
 */
@Controller("ixUseSelect")
@Scope("prototype")
@RequestMapping("/ix/useapply/select")
public class UseSelectAction extends ProjBaseAction {

	@Autowired
	private UseSelectService uService;

	// 用印查询
	@RequestMapping("/list")
	public ModelAndView list(String srh_reason, String srh_name,
			String srh_word, String srh_status) {

		List<Map<String, Object>> list = uService.selectUseList(srh_reason,
				srh_name, srh_word, srh_status, page);

		ModelAndView mv = new ModelAndView("/jsp/useapply/select/list");
		mv.addObject("list", list);
		return mv;
	}

	// 已用印查询
	@RequestMapping("/done_list")
	public ModelAndView done_list(String srh_code) {

		List<Map<String, Object>> list = uService.getDoneUseObj(srh_code, page);

		ModelAndView mv = new ModelAndView("/jsp/useapply/select/done_list");
		mv.addObject("list", list);
		return mv;
	}

	// 用印在办
	@RequestMapping("/do_list")
	public ModelAndView do_list(String srh_reason, String srh_name,
			String srh_word, String srh_status) {

		List<Map<String, Object>> list = uService.getOndoUseList(srh_reason,
				srh_name, srh_word, srh_status, page);

		ModelAndView mv = new ModelAndView("/jsp/useapply/select/do_list");
		mv.addObject("list", list);
		return mv;
	}

	// 审批查询
	@RequestMapping("/verify_list")
	public ModelAndView verify_list(String srh_content, String srh_user,
			String srh_start, String srh_end) {

		List<Map<String, Object>> list = uService.getVerifyUseList(srh_content,
				srh_start, srh_end, srh_user, page);

		ModelAndView mv = new ModelAndView("/jsp/useapply/select/verify_list");
		mv.addObject("list", list);
		return mv;
	}

	// 用印 情况报表
	@RequestMapping("/all_list")
	public ModelAndView all_list(String srh_reason, String srh_name,
			String srh_user, String srh_status) {

		List<Map<String, Object>> list = uService.getAllUseList(srh_reason,
				srh_name, srh_user, srh_status, page);

		ModelAndView mv = new ModelAndView("/jsp/useapply/select/all_list");
		mv.addObject("list", list);
		return mv;
	}
}
